<template>
  <div class="app-container">
    <div class="searchBox">
      <el-form :inline="true">
        <el-form-item label="应用名称：">
          <el-input v-model="search.appName" placeholder="请输入应用名称" />
        </el-form-item>
        <el-form-item label="用户名称：">
          <el-input v-model="search.userName" placeholder="请输入用户名称" />
        </el-form-item>

        <el-form-item>
          <el-button type="primary" @click="searchQuery">查询</el-button>
          <el-button
            type="info"
            @click="
              search = {};
              searchQuery();
            "
          >重置</el-button>
        </el-form-item>
      </el-form>
    </div>

    <qm-table
      ref="qmTable"
      :data="query"
      key-prop="logId"
      :form-validate="defaultFormValidate"
      is-custom-form
      :show-edit="false"
      :show-add="false"
       menuType="text"
    >
      <qm-table-column field="appId" sortable="true">应用编号</qm-table-column>
      <qm-table-column
        field="appName"
        sortable="true"
      >应用名称</qm-table-column>
      <qm-table-column field="appVersion" sortable="true">应用版本</qm-table-column>
      <qm-table-column field="userId" sortable="true">用户编号</qm-table-column>
      <qm-table-column field="loginId" sortable="true">登录编号</qm-table-column>
      <qm-table-column
        field="userName"
        sortable="true"
      >用户名称</qm-table-column>
      <qm-table-column field="ip" sortable="true">IP</qm-table-column>
      <qm-table-column
        field="deviceId"
        sortable="true"
      >设备编号</qm-table-column>
      <qm-table-column
        field="deviceName"
        sortable="true"
      >设备名称</qm-table-column>
      <qm-table-column
        field="deviceVendor"
        sortable="true"
      >设备厂商</qm-table-column>
      <qm-table-column field="osName" sortable="true">系统名称</qm-table-column>
      <qm-table-column
        field="osVersion"
        sortable="true"
      >系统版本</qm-table-column>
      <qm-table-column
        field="osVendor"
        sortable="true"
      >系统厂商</qm-table-column>
      <qm-table-column
        field="osLanguage"
        sortable="true"
      >系统语言</qm-table-column>
      <qm-table-column
        field="loginTime"
        sortable="true"
      >登录时间</qm-table-column>

      <template #form="{ models, controlData, pageAction,disabled }">
        <create
          ref="create"
          :models="models"
          :control-data="controlData"
          :page-action="pageAction"
          :disabled="disabled"
        />
      </template>
    </qm-table>
  </div>
</template>

<script>
import Controller from '@/libs/framework/controller'
import Create from './create'
export default class Instance extends Controller {
  onBeforeInit() {
    this.urls = {
      model: '/mobile/mobileUserLoginLog/getListModel',
      query: '/mobile/mobileUserLoginLog/query',
      save: '/mobile/mobileUserLoginLog/save',
      delete: '/mobile/mobileUserLoginLog/delete',
      entity: '/mobile/mobileUserLoginLog/getEntity'
    }
  }

  mixin() {
    return {
      components: {
        Create
      },
      data() {
        return {}
      },
      methods: {}
    }
  }
}
</script>

<style scoped lang="scss"></style>
